package ar.com.photo_admin.selenium

import grails.plugins.selenium.*
import org.junit.*
import static org.junit.Assert.*
import static org.hamcrest.Matchers.*

@Mixin(SeleniumAware)
class CreateEventTest {

	@Before void setUp() {
	}

	
	@Test void simpleEvent() {
		def eventName = "Prueba Selenium"
		
		selenium.open("/PhotoAdminGrailsApp/event/list");
		selenium.click("id=btnCreateEvent");
		selenium.waitForPageToLoad("30000");
		selenium.type("eventName", eventName);
		selenium.click("id=eventDate-trigger");		
		selenium.keyPress("id=eventDate-trigger","\\13");
		selenium.click("id=btn_save");
		selenium.waitForPageToLoad("30000");	
		selenium.assertText("id=txtEventName",eventName);	
		
	}	
	
	@After void tearDown() {
	}
}
